package com.bxji.spring.eurekaclient;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

/**
 * @RibbonClient 可以指定特定提供者的负载均衡方式 <br/>
 * @ComponentScan 排除扫描配置文件ExcludeFromComponentScan <br/>
 * @LoadBalanced 指定使用ribbon做负载均衡 <br/>
 * 
 * @author bxji
 *
 */
@SpringBootApplication
@EnableEurekaClient
@RibbonClient(name = "MSEC-PROVIDER-01", configuration = ConsumerConfiguration.class)
@ComponentScan(excludeFilters = {
        @ComponentScan.Filter(type = FilterType.ANNOTATION, value = ExcludeFromComponentScan.class) })
public class MsecConsumerApp {



    public static void main(String[] args) {
        System.out.println(" ###########################################################");
        System.out.println(" ###    ===  启动  msec-consumer 服务消费者 ===>>    ");
        System.out.println(" ###    采用注解方式 ，定制Rabbon客户端负载均衡策略                 ");
        System.out.println(" ###########################################################");
        SpringApplication.run(MsecConsumerApp.class, args);
    }

}
